﻿#region Using directives

using System;
using System.Collections;
using System.Data;
using UFSoft.UBF.UI.MD.Runtime;
using UFSoft.UBF.UI.MD.Runtime.Implement;

#endregion

namespace MF.HSD.MFHSDStdUnitCostUIModel
{
	[Serializable]
	public partial class MFHSDStdUnitCostUIModelModel : UIModel
	{
		#region Constructor
		public MFHSDStdUnitCostUIModelModel() : base("MFHSDStdUnitCostUIModel")
		{
			InitClass();
			this.SetResourceInfo("6ad42ce0-437f-4b6e-bafd-ebf8eaaf4c76");
            try{
			    AfterInitModel();
            }catch(Exception exception){
              IUIModel model = this;
		      this.ErrorMessage.SetErrorMessage(ref model,exception);
			}
		}

		//just for Clone 
		private MFHSDStdUnitCostUIModelModel(bool isInit) : base("MFHSDStdUnitCostUIModel")
		{}
		protected override IUIModel CreateCloneInstance()
		{
			return new MFHSDStdUnitCostUIModelModel(false);
		}
		#endregion
		#region member
		#region views
		private MFHSDStdUnitCostUIView viewMFHSDStdUnitCostUI;			
		#endregion
		
		#region links
		#endregion
		
		#region properties
		#endregion
		#endregion

		#region property
		public MFHSDStdUnitCostUIView MFHSDStdUnitCostUI
		{
			get { return (MFHSDStdUnitCostUIView)this["MFHSDStdUnitCostUI"]; }
		}
		
		#region RealViews
		#endregion
		
	
		#endregion

		#region function
		private void InitClass()
		{
			this.viewMFHSDStdUnitCostUI = new MFHSDStdUnitCostUIView(this);
			this.viewMFHSDStdUnitCostUI.SetResourceInfo("bab71b42-1ab4-458f-bbee-fb8d74c6c7df");
			this.Views.Add(this.viewMFHSDStdUnitCostUI);			

			
		}

		public override string AssemblyName
		{
			get { return "MF.HSD.MFHSDProject_UIProject"; }
		}
		
		#endregion
		private void OnValidate_DefualtImpl()
    {
    }

	}


	[Serializable]
	public partial class MFHSDStdUnitCostUIView : UIView
	{
		#region Constructor
		public MFHSDStdUnitCostUIView(IUIModel model) : base(model,"MFHSDStdUnitCostUI","", true)
		{
			InitClass();
		}
		//构造空实例,不进行初始化.目前为Clone使用.
		private MFHSDStdUnitCostUIView():base(null,"MFHSDStdUnitCostUI","", true)
		{
		}
		protected override IUIView CreateCloneInstance()
		{
			return new MFHSDStdUnitCostUIView();
		}
		#endregion

		#region fiels property filter
		public IUIField FieldID
		{
			get { return this.Fields["ID"]; }
		}
		public IUIField FieldCreatedOn
		{
			get { return this.Fields["CreatedOn"]; }
		}
		public IUIField FieldCreatedBy
		{
			get { return this.Fields["CreatedBy"]; }
		}
		public IUIField FieldModifiedOn
		{
			get { return this.Fields["ModifiedOn"]; }
		}
		public IUIField FieldModifiedBy
		{
			get { return this.Fields["ModifiedBy"]; }
		}
		public IUIField FieldSysVersion
		{
			get { return this.Fields["SysVersion"]; }
		}
		public IUIField FieldCostField
		{
			get { return this.Fields["CostField"]; }
		}
		public IUIField FieldCostField_Code
		{
			get { return this.Fields["CostField_Code"]; }
		}
		public IUIField FieldCostField_Name
		{
			get { return this.Fields["CostField_Name"]; }
		}


		[Obsolete("请使用CurrentFilter属性，这个方法有可能会导致强弱类型转换出错")]
		public MFHSDStdUnitCostUIDefaultFilterFilter DefaultFilter
		{
			get { return (MFHSDStdUnitCostUIDefaultFilterFilter)this.CurrentFilter; }
		}
		#endregion

		#region Init
		private void InitClass()
		{
			UIModelRuntimeFactory.AddNewUIField(this,"ID", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","10843c37-3b65-4c01-909f-a2af453d9c78");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","2b2a2b1c-f7bb-44e3-a542-d9dbc4e01032");
			UIModelRuntimeFactory.AddNewUIField(this,"CreatedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","69cc24cb-bb08-4c7a-ba45-367fb3d42fdf");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedOn", typeof(DateTime), false,"","System.DateTime", "", false,false, false, "",false,(UIFieldType)1,"3834a958-120f-4ac9-8d60-1a7be6d3f12f","21c24848-eb38-48e6-a7d3-8aaa30163b35");
			UIModelRuntimeFactory.AddNewUIField(this,"ModifiedBy", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","fba8bfde-6c49-407b-885c-49e06088a25d");
			UIModelRuntimeFactory.AddNewUIField(this,"SysVersion", typeof(Int64), false,"","System.Int64", "", false,false, false, "",false,(UIFieldType)1,"ba391065-6c27-4c82-acc8-b52b1c93a910","544c8274-b47e-479f-b242-14cbc860d0f8");
			UIModelRuntimeFactory.AddNewUIField(this,"CostField", typeof(Int64), false,"","UFIDA.U9.CBO.MFG.CO.CostField", "", false,false, false, "",false,(UIFieldType)4,"633a12e7-2981-47a2-8f40-4ba5f8ddf3fa","d51de9a9-91c5-42f0-ae22-110307c3d10e");
			UIModelRuntimeFactory.AddNewUIField(this,"CostField_Code", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","bc566086-1d1c-4c26-925f-939298fce3a8");
			UIModelRuntimeFactory.AddNewUIField(this,"CostField_Name", typeof(String), false,"","System.String", "", false,false, false, "",false,(UIFieldType)1,"3d174255-fd12-47f7-8844-3b5e4fae9e8c","b9c1bd6d-dc8c-410f-88fe-38740ca42342");


			this.CurrentFilter = new MFHSDStdUnitCostUIDefaultFilterFilter(this);
		}
		#endregion
		
		#region override method
		protected override IUIRecord BuildNewRecord(IUIRecordBuilder builder)
		{
			return new MFHSDStdUnitCostUIRecord(builder);
		}
		#endregion

		#region new method
		public new MFHSDStdUnitCostUIRecord FocusedRecord
		{
			get { return (MFHSDStdUnitCostUIRecord)base.FocusedRecord ; }
			set { base.FocusedRecord = value ; }
		}
		public new MFHSDStdUnitCostUIRecord AddNewUIRecord()
		{	
			return (MFHSDStdUnitCostUIRecord)base.AddNewUIRecord();
		}
		public new MFHSDStdUnitCostUIRecord NewUIRecord()
		{	
			return (MFHSDStdUnitCostUIRecord)base.NewUIRecord();
		}
		#endregion 

	}

	[Serializable]
	public class MFHSDStdUnitCostUIRecord : UIRecord
	{
		#region Constructor
		public MFHSDStdUnitCostUIRecord(IUIRecordBuilder builder):base(builder)
		{
		}
		private MFHSDStdUnitCostUIView uiviewMFHSDStdUnitCostUI
		{
			get { return (MFHSDStdUnitCostUIView)this.ContainerView; }
		}
		protected override IUIRecord CreateCloneInstance(IUIRecordBuilder builder)
		{
			return new MFHSDStdUnitCostUIRecord(builder);
		}
		#endregion

		#region property
		
		
		public  Int64 ID
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldID] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewMFHSDStdUnitCostUI.FieldID);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldID] = value;
			}
		}
		
		
		public  DateTime CreatedOn
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldCreatedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewMFHSDStdUnitCostUI.FieldCreatedOn);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldCreatedOn] = value;
			}
		}
		
		
		public  String CreatedBy
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldCreatedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewMFHSDStdUnitCostUI.FieldCreatedBy);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldCreatedBy] = value;
			}
		}
		
		
		public  DateTime ModifiedOn
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldModifiedOn] ;
				//return (DateTime)value;
				return GetValue<DateTime>(this.uiviewMFHSDStdUnitCostUI.FieldModifiedOn);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldModifiedOn] = value;
			}
		}
		
		
		public  String ModifiedBy
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldModifiedBy] ;
				//return (String)value;
				return GetValue<String>(this.uiviewMFHSDStdUnitCostUI.FieldModifiedBy);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldModifiedBy] = value;
			}
		}
		
		
		public new Int64 SysVersion
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldSysVersion] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewMFHSDStdUnitCostUI.FieldSysVersion);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldSysVersion] = value;
			}
		}
		
		
		public  Int64 CostField
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldCostField] ;
				//return (Int64)value;
				return GetValue<Int64>(this.uiviewMFHSDStdUnitCostUI.FieldCostField);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldCostField] = value;
			}
		}
		
		
		public  String CostField_Code
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldCostField_Code] ;
				//return (String)value;
				return GetValue<String>(this.uiviewMFHSDStdUnitCostUI.FieldCostField_Code);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldCostField_Code] = value;
			}
		}
		
		
		public  String CostField_Name
		{
			get{
				//object value = this[this.uiviewMFHSDStdUnitCostUI.FieldCostField_Name] ;
				//return (String)value;
				return GetValue<String>(this.uiviewMFHSDStdUnitCostUI.FieldCostField_Name);
			}
			set{
				this[this.uiviewMFHSDStdUnitCostUI.FieldCostField_Name] = value;
			}
		}
		#endregion
	}
	
	[Serializable]
	public class MFHSDStdUnitCostUIDefaultFilterFilter : UIFilter
	{
		#region Constructor
		public MFHSDStdUnitCostUIDefaultFilterFilter(IUIView view) 
			: base("DefaultFilter",view,@"",@"")
		{
			InitClass();
		}
		//for Clone Constructor
		private MFHSDStdUnitCostUIDefaultFilterFilter()
			: base("DefaultFilter",null,"","")
		{}
		protected override IUIFilter CreateCloneInstance()
		{
			return new MFHSDStdUnitCostUIDefaultFilterFilter();
		}
		#endregion

		#region property
		#endregion
		
		#region function
		private void InitClass()
		{
		}
		#endregion

	}



}